﻿using DocumentFormat.OpenXml.Lite.Core.Interfaces;
using DocumentFormat.OpenXml.Lite.Core.Office;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.WordprocessingML.Word.FooterElements
{
    /// <summary>
    /// Block Level Structured Document Tag
    /// </summary>
    [XmlRoot("sdt", Namespace = Constants.WordMain)]
    public class BLSDocumentTag : XmlSerializable, IOfficeElement
    {
        [XmlIgnore]
        public Guid DocumentId { get; set; }

        [Optional]
        [XmlElement("sdtPr", Namespace = Constants.WordMain)]
        public BLSProperties Property { get; set; }

        [Optional]
        [XmlElement("sdtEndPr", Namespace = Constants.WordMain)]
        public BLSEndProperties CharacterProperty { get; set; }

        [XmlIgnore]
        private BLSContent content;

        [Optional]
        [XmlElement("sdtContent", Namespace = Constants.WordMain)]
        public BLSContent Content 
        {
            get { return content; }
            set { content = value; content.DocumentId = this.DocumentId; }
        }

        public BLSDocumentTag() { }
    }
}
